package com.open.cloud.rbac.service.permission;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.open.cloud.rbac.entity.permission.CorePermission;
import com.open.cloud.rbac.object.permission.CorePermissionAllocMenuDto;
import com.open.cloud.rbac.object.permission.CorePermissionDto;
import com.open.cloud.rbac.object.permission.CorePermissionSelectDto;
import com.open.cloud.rbac.object.permission.CorePermissionVo;

import java.util.List;

/**
 * <p>
 * 权限表 服务类
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
public interface ICorePermissionService extends IService<CorePermission> {

    /**
     * 新增权限信息
     *
     * @param permissionDto
     * @return
     */
    public JSONObject addPermissionInfo(CorePermissionDto permissionDto);

    /**
     * 更新权限信息
     *
     * @param permissionDto
     * @return
     */
    public JSONObject updatePermissionInfo(CorePermissionDto permissionDto);

    /**
     * 删除权限信息
     *
     * @param permissionId
     * @return
     */
    public JSONObject deletePermissionInfo(String permissionId);

    /**
     * 根据条件分页查询权限信息
     *
     * @param selectDto
     * @return
     */
    public IPage<CorePermissionVo> getPermissionPage(CorePermissionSelectDto selectDto);

    /**
     * 获取权限分配的菜单Id列表
     *
     * @param permissionId
     * @return
     */
    public List<String> getPermissionRelMenu(String permissionId);

    /**
     * 权限分配菜单
     *
     * @param pAllocMenuDto
     * @return
     */
    public JSONObject setPermissionAllocMenus(CorePermissionAllocMenuDto pAllocMenuDto);

}
